import React, {useImperativeHandle, forwardRef, useState} from 'react';



const Democonp=forwardRef(((prop, ref) => {
    const [bla,setBla]=useState('zzzxxx')
    let props=prop.props
    //console.log('Democonp',prop);
    let big=props.big?props.big:'big null'
    let small=props.small?props.small:'small null'

    useImperativeHandle(ref,()=>({
        changebla,
    }))
    const changebla = () => {
      setBla(bla+'x')
    }
    return (
        <div>
            {big}
            {bla}
            {small}
        </div>
    );
}))


export default Democonp;